package com.zsx.shopping.user.converter;

import com.zsx.shopping.common.api.user.vo.ReceiveAddressVO;
import com.zsx.shopping.user.entity.ReceiveAddress;
import com.zsx.shopping.user.form.ReceiveAddressForm;
import org.mapstruct.Mapper;

import java.util.List;

@Mapper(componentModel = "spring")
public interface ReceiveAddressConverter {

    ReceiveAddressVO toReceiveAddressVO(ReceiveAddress receiveAddress);

    List<ReceiveAddressVO> toReceiveAddressVOs(List<ReceiveAddress> receiveAddresses);

    ReceiveAddress toReceiveAddress(ReceiveAddressForm receiveAddressForm, Long userId, Boolean defaultState);
}
